<template>
  <div :class="isselected?'numb_box selected':'numb_box'" @click="isclicked">
      {{savenumb}}
    </div>
</template>

<script>
export default {
  props: ['numb', 'selected', 'selecteditenNumber'],
  data: function () {
    return {
      savenumb: '',
      isclickedItems: false
    }
  },
  mounted: function () {
    this.savenumb = this.numb
  },
  methods: {
    isclicked: function () {
      this.$emit('GetChildreninfo', this.savenumb)
    }
  },
  computed: {
    isselected: function () {
      if (parseInt(this.selecteditenNumber) === parseInt(this.savenumb)) {
        return true
      } else {
        return false
      }
    }
  }
}
</script>

<style>
.numb_box {
  width: 95rpx;
  height: 95rpx;
  float: left;
  text-align: center;
  line-height: 95rpx;
  color: #656565;
  margin: 7rpx
}
.selected {
  background-color: #f7f4d5;
  border-radius: 50%;
  color: #ddb147;
}
</style>
